<style>
 table tr{
	 height:25px;
}
#middle .content {
    float: left;
    font-size: 13px;
    line-height: normal;
    margin: 0 0 0 0 !important;
    width: 727px !important;
}
</style>
<style type="text/css">

/* ---- calendar and input styles ---- */

input.DatePicker{
	display: block;
	width: 150px;
	padding: 3px 3px 3px 24px;
	border: 1px solid #0070bf;
	font-size: 13px;
	background: #fff url("date.gif") no-repeat top left;
	cursor: pointer;
}
input:focus.DatePicker{
	background: #fffce9 url("datefocus.gif") no-repeat top left;
}
.dp_container{
	position: relative;
	padding: 0;
	z-index: 500;
}
.dp_cal{
	background-color: #fff;
	border: 1px solid #0070bf;
	position: absolute;
	width: 177px;
	top: 24px;
	left: 0;
	margin: 0px 0px 3px 0px;
}
.dp_cal table{
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
}
.dp_cal select{
	margin: 2px 3px;
	font-size: 11px;
}
.dp_cal select option{
	padding: 1px 3px;
}
.dp_cal th,
.dp_cal td{
	width: 14.2857%;
	text-align: center;
	font-size: 11px;
	padding: 2px 0;
}
.dp_cal th{
	border: solid #aad4f2;
	border-width: 1px 0;
	color: #797774;
	background: #daf2e6;
	font-weight: bold;
}
.dp_cal td{
	cursor: pointer;
}
.dp_cal thead th{
	background: #d9eefc;
}
.dp_cal td.dp_roll{
	color: #000;
	background: #fff6bf;
}
/* must have this for the IE6 select box hiding */
.dp_hide{
	visibility: hidden;
}
.dp_empty{
	background: #eee;
}
.dp_today{
	background: #daf2e6;
}
.dp_selected{
	color: #fff;
	background: #328dcf;
}



/* ---- just to pretty up this page ---- */


dl{
	font-size: 12px;
	text-align: left;
}
dt, dd.default{
	font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace;
	font-weight: bold;
}
dt{
	clear: left;
	float: left;
	width: 140px;
	padding: 5px;
	text-align: right;
}
dd{
	margin: 5px 0 30px 160px;
	padding: 5px;
}
.default{
	margin: 0 0 0 160px;
	background: #eee;
}
p.note{
	background: #ffd;
	border: 1px solid #dd6;
	display: block;
	float: none;
	font-size: 12px;
	line-height: 1.8;
	padding: 10px;
	width: auto;
}
code{
	background: #eee;
	border: 1px solid #ccc;
	padding: 0 5px;
}
</style>
<?php echo $javascript->link(array('mootools','DatePicker')); ?>
	<script type="text/javascript">
	
	// The following should be put in your external js file,
	// with the rest of your ondomready actions.
	
	window.addEvent('domready', function(){
	
		$$('input.DatePicker').each( function(el){
			new DatePicker(el);
		});
	
	});
</script>

<div id="middle" class="company">	
	<div class="title">			
		<h1 style="font-size:15px;">Hỗ trợ kinh doanh </h1>
	</div>
	 
	<div class="content">
    
		<div id="contents" title="" style="overflow:none;"> 
        
        	<table width="129%" height="25" cellspacing="0" cellpadding="0" border="0">
			<tbody><tr>
			<td bgcolor="#7CC0EE" style="padding-left:20px; padding-right: 20px;"><b>Thống kê kinh doanh theo tháng</b>         
            </td>
			</tr>
			</tbody></table>
              <form action="<?php echo System?>/seachBusiness" method="post">
              <table width="129%" cellspacing="1" cellpadding="1" border="0" bgcolor="#CCCCCC">
				  <tbody>	                       
                            <tr bgcolor="#FFFFFF">
                                <td width="20%"  ><center><b>Ngày bắt đầu</b></center></td>
                                <?php $date=date('d-m-Y');
									  $day=date('d');
									 if($day<10){
										$day='0'.$day;
									}
									 $month = date('m')-1;
									 if($month==1){
											$month=12;
										}
									 if($month<10){
											$month='0'.$month;
										}	
									$year = date('Y');
									$expiry_date=$day.'-'.$month .'-'.$year;
								
								
								?>
                                <td width="8%"><input readonly="readonly" id="birthday" name="startDate" value="<?php echo $expiry_date?>" class="DatePicker" tabindex="1" type="text"></td>
                                <td width="20%"><center><b>Ngày kết thúc</b></center></td>
                                
                               <td width="8%"><input readonly="readonly" id="birthday" name="endDate" class="DatePicker" tabindex="1" value="<?php echo $date?>" type="text"></td>
                                <td width="20%"><center><input style="height:22px;" type="submit" value="Xem" /></center> </td>
                            </tr>
       				</tbody>
             </table>
             <form>
            <p></p>
        	<table width="129%" height="25" cellspacing="0" cellpadding="0" border="0">
			<tbody><tr>
			<td bgcolor="#7CC0EE" style="padding-left:20px; padding-right: 20px;"><b>Thống kê kinh doanh</b>&nbsp;&nbsp;          
            </td>
			<td width="140" bgcolor="#7CC0EE" style="padding-left:20px; padding-right: 20px;"><b>1PV = 20.000 VNĐ</b></td>
			</tr>
			</tbody></table>
            <table width="129%" cellspacing="1" cellpadding="1" border="0" bgcolor="#CCCCCC">
				  <tbody>	                       
                            <tr bgcolor="#FFFFFF">
                                <td width="3%" a ><center><b>stt</b></center></td>
                                <td width="8%"><center><b>Mã hóa đơn</b></center></td>
                                <td width="40%"><center><b>Chi tiết hóa đơn </b></center></td>
                                <td width="15%"><center><b>Chi phí</b> (VNĐ)</center> </td>
                                <td width="15%"><center><b>PV</b></center></td> 
                                <td width="10%"><center><b>Ngày nhận</b></center></td>                           
                            </tr>
                            
                        
                            <?php foreach($business as $key=>$busines) { $i=$key +1;?>
                            <tr bgcolor="#FFFFFF">
                                 <td><?php echo $i ?></td>
                                <td><?php echo $busines['Invoice']['code']?></td>
                                <td ><?php echo $busines['Invoice']['interpretation']?></td>
                                <td ><center><?php echo number_format($busines['Invoice']['total_money'])?></center></td>
                                <td ><center><?php $pv= $busines['Invoice']['total_money']/ 20000; echo $pv;?></center></td>
                                <td ><?php echo date('d-m-Y', strtotime($busines['Invoice']['created'])); ?></td>
                           
                            </tr>
                            <?php }?>
                             
       				</tbody>
             </table>
              	
        
        </div>               
			
	</div>
	<span class="clear"></span>
</div>